Option Strict On
Option Explicit On 

Public Class Layout
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
    Friend WithEvents miButtonNext As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonBrowse As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonBar1 As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonDelete As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonCancel As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonComputer As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonExpand As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonMultiSelect As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertSub As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertBar1 As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonLookup As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonDrilldown As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonBar2 As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonUpdate As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonEdit As System.Windows.Forms.MenuItem
    Friend WithEvents miInsert As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertLine As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertFrame As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertLabel As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertTextBox As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertPictureBox As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertCheckBox As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertButton As System.Windows.Forms.MenuItem
    Friend WithEvents miButtonSelect As System.Windows.Forms.MenuItem
    Friend WithEvents miInsertChart As System.Windows.Forms.MenuItem
    Friend WithEvents miMembersProperties As System.Windows.Forms.MenuItem
    Friend WithEvents miSectionProperties As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutProperties As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar8 As System.Windows.Forms.MenuItem
    Friend WithEvents Panel1 As System.Windows.Forms.Panel
    Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
    Friend WithEvents ciButtonComputer As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonNext As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonBrowse As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonBar1 As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonDelete As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonExpand As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonMultiSelect As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonBar2 As System.Windows.Forms.MenuItem
    Friend WithEvents tbChart As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSub As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSep22 As System.Windows.Forms.ToolBarButton
    Friend WithEvents ciButtonLookup As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonDrillDown As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonCancel As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonUpdate As System.Windows.Forms.MenuItem
    Friend WithEvents tbFrame As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbLine As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSep21 As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbPointer As System.Windows.Forms.ToolBarButton
    Friend WithEvents Toolbar2 As System.Windows.Forms.ToolBar
    Friend WithEvents tbLabel As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbTextBox As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbPictureBox As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbCheckBox As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbButton As System.Windows.Forms.ToolBarButton
    Friend WithEvents ContextMenu3 As System.Windows.Forms.ContextMenu
    Friend WithEvents ciButtonSelect As System.Windows.Forms.MenuItem
    Friend WithEvents ciButtonEdit As System.Windows.Forms.MenuItem
    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
    Friend WithEvents miMembersChangeTo As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar7 As System.Windows.Forms.MenuItem
    Friend WithEvents miFileBar1 As System.Windows.Forms.MenuItem
    Friend WithEvents miFileClose As System.Windows.Forms.MenuItem
    Friend WithEvents miFile As System.Windows.Forms.MenuItem
    Friend WithEvents miFilePageSetup As System.Windows.Forms.MenuItem
    Friend WithEvents miFilePrintPreview As System.Windows.Forms.MenuItem
    Friend WithEvents miFilePrint As System.Windows.Forms.MenuItem
    Friend WithEvents miFileBar2 As System.Windows.Forms.MenuItem
    Friend WithEvents miFileFormView As System.Windows.Forms.MenuItem
    Friend WithEvents miFileDatasheetView As System.Windows.Forms.MenuItem
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents miEdit As System.Windows.Forms.MenuItem
    Friend WithEvents miEditUndo As System.Windows.Forms.MenuItem
    Friend WithEvents miEditRedo As System.Windows.Forms.MenuItem
    Friend WithEvents miEditBar1 As System.Windows.Forms.MenuItem
    Friend WithEvents miEditCut As System.Windows.Forms.MenuItem
    Friend WithEvents miEditCopy As System.Windows.Forms.MenuItem
    Friend WithEvents miEditPaste As System.Windows.Forms.MenuItem
    Friend WithEvents miEditBar2 As System.Windows.Forms.MenuItem
    Friend WithEvents miEditSelectAll As System.Windows.Forms.MenuItem
    Friend WithEvents miView As System.Windows.Forms.MenuItem
    Friend WithEvents miViewOpen As System.Windows.Forms.MenuItem
    Friend WithEvents miViewPropertyPage As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar1 As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutRuler As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutGrid As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar2 As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutSnapToGrid As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutLockControls As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar3 As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutPrintableView As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutFormView As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar4 As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutPageHeader As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutGroupHeader As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutDetail As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutGroupFooter As System.Windows.Forms.MenuItem
    Friend WithEvents miLayoutPageFooter As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar5 As System.Windows.Forms.MenuItem
    Friend WithEvents miMembersAlignToGrid As System.Windows.Forms.MenuItem
    Friend WithEvents miMembersSizeToGrid As System.Windows.Forms.MenuItem
    Friend WithEvents miViewBar6 As System.Windows.Forms.MenuItem
    Friend WithEvents miMembersBringToFront As System.Windows.Forms.MenuItem
    Friend WithEvents miMembersSendToBack As System.Windows.Forms.MenuItem
    Friend WithEvents tbPropertyPage As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSep4 As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbRedo As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSep1 As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbPrintPreview As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbPrint As System.Windows.Forms.ToolBarButton
    Friend WithEvents Toolbar1 As System.Windows.Forms.ToolBar
    Friend WithEvents tbFormView As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbDatasheetView As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSep2 As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbCut As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbCopy As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbPaste As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbSep3 As System.Windows.Forms.ToolBarButton
    Friend WithEvents tbUndo As System.Windows.Forms.ToolBarButton
    Friend WithEvents PageSetupDialog1 As System.Windows.Forms.PageSetupDialog
    Friend WithEvents Panel2 As System.Windows.Forms.Panel
    Friend WithEvents PropertyGrid1 As System.Windows.Forms.PropertyGrid
    Friend WithEvents Designer1 As Avand.Designer
    Friend WithEvents Splitter1 As System.Windows.Forms.Splitter
    Friend WithEvents Title1 As Avand.Title

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Layout))
        Me.miButtonNext = New System.Windows.Forms.MenuItem()
        Me.miButtonBrowse = New System.Windows.Forms.MenuItem()
        Me.miButtonBar1 = New System.Windows.Forms.MenuItem()
        Me.miButtonDelete = New System.Windows.Forms.MenuItem()
        Me.miButtonCancel = New System.Windows.Forms.MenuItem()
        Me.miButtonComputer = New System.Windows.Forms.MenuItem()
        Me.miButtonExpand = New System.Windows.Forms.MenuItem()
        Me.miButtonMultiSelect = New System.Windows.Forms.MenuItem()
        Me.miInsertSub = New System.Windows.Forms.MenuItem()
        Me.miInsertBar1 = New System.Windows.Forms.MenuItem()
        Me.miButtonLookup = New System.Windows.Forms.MenuItem()
        Me.miButtonDrilldown = New System.Windows.Forms.MenuItem()
        Me.miButtonBar2 = New System.Windows.Forms.MenuItem()
        Me.miButtonUpdate = New System.Windows.Forms.MenuItem()
        Me.miButtonEdit = New System.Windows.Forms.MenuItem()
        Me.miInsert = New System.Windows.Forms.MenuItem()
        Me.miInsertLine = New System.Windows.Forms.MenuItem()
        Me.miInsertFrame = New System.Windows.Forms.MenuItem()
        Me.miInsertLabel = New System.Windows.Forms.MenuItem()
        Me.miInsertTextBox = New System.Windows.Forms.MenuItem()
        Me.miInsertPictureBox = New System.Windows.Forms.MenuItem()
        Me.miInsertCheckBox = New System.Windows.Forms.MenuItem()
        Me.miInsertButton = New System.Windows.Forms.MenuItem()
        Me.miButtonSelect = New System.Windows.Forms.MenuItem()
        Me.miInsertChart = New System.Windows.Forms.MenuItem()
        Me.miMembersProperties = New System.Windows.Forms.MenuItem()
        Me.miSectionProperties = New System.Windows.Forms.MenuItem()
        Me.miLayoutProperties = New System.Windows.Forms.MenuItem()
        Me.miViewBar8 = New System.Windows.Forms.MenuItem()
        Me.Panel1 = New System.Windows.Forms.Panel()
        Me.Designer1 = New Avand.Designer()
        Me.ContextMenu1 = New System.Windows.Forms.ContextMenu()
        Me.ciButtonComputer = New System.Windows.Forms.MenuItem()
        Me.ciButtonNext = New System.Windows.Forms.MenuItem()
        Me.ciButtonBrowse = New System.Windows.Forms.MenuItem()
        Me.ciButtonBar1 = New System.Windows.Forms.MenuItem()
        Me.ciButtonDelete = New System.Windows.Forms.MenuItem()
        Me.ciButtonExpand = New System.Windows.Forms.MenuItem()
        Me.ciButtonMultiSelect = New System.Windows.Forms.MenuItem()
        Me.ciButtonBar2 = New System.Windows.Forms.MenuItem()
        Me.tbChart = New System.Windows.Forms.ToolBarButton()
        Me.tbSub = New System.Windows.Forms.ToolBarButton()
        Me.tbSep22 = New System.Windows.Forms.ToolBarButton()
        Me.ciButtonLookup = New System.Windows.Forms.MenuItem()
        Me.ciButtonDrillDown = New System.Windows.Forms.MenuItem()
        Me.ciButtonCancel = New System.Windows.Forms.MenuItem()
        Me.ciButtonUpdate = New System.Windows.Forms.MenuItem()
        Me.tbFrame = New System.Windows.Forms.ToolBarButton()
        Me.tbLine = New System.Windows.Forms.ToolBarButton()
        Me.tbSep21 = New System.Windows.Forms.ToolBarButton()
        Me.tbPointer = New System.Windows.Forms.ToolBarButton()
        Me.Toolbar2 = New System.Windows.Forms.ToolBar()
        Me.tbLabel = New System.Windows.Forms.ToolBarButton()
        Me.tbTextBox = New System.Windows.Forms.ToolBarButton()
        Me.tbPictureBox = New System.Windows.Forms.ToolBarButton()
        Me.tbCheckBox = New System.Windows.Forms.ToolBarButton()
        Me.tbButton = New System.Windows.Forms.ToolBarButton()
        Me.ContextMenu3 = New System.Windows.Forms.ContextMenu()
        Me.ciButtonSelect = New System.Windows.Forms.MenuItem()
        Me.ciButtonEdit = New System.Windows.Forms.MenuItem()
        Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
        Me.miMembersChangeTo = New System.Windows.Forms.MenuItem()
        Me.miViewBar7 = New System.Windows.Forms.MenuItem()
        Me.miFileBar1 = New System.Windows.Forms.MenuItem()
        Me.miFileClose = New System.Windows.Forms.MenuItem()
        Me.miFile = New System.Windows.Forms.MenuItem()
        Me.miFilePageSetup = New System.Windows.Forms.MenuItem()
        Me.miFilePrintPreview = New System.Windows.Forms.MenuItem()
        Me.miFilePrint = New System.Windows.Forms.MenuItem()
        Me.miFileBar2 = New System.Windows.Forms.MenuItem()
        Me.miFileFormView = New System.Windows.Forms.MenuItem()
        Me.miFileDatasheetView = New System.Windows.Forms.MenuItem()
        Me.MainMenu1 = New System.Windows.Forms.MainMenu(Me.components)
        Me.miEdit = New System.Windows.Forms.MenuItem()
        Me.miEditUndo = New System.Windows.Forms.MenuItem()
        Me.miEditRedo = New System.Windows.Forms.MenuItem()
        Me.miEditBar1 = New System.Windows.Forms.MenuItem()
        Me.miEditCut = New System.Windows.Forms.MenuItem()
        Me.miEditCopy = New System.Windows.Forms.MenuItem()
        Me.miEditPaste = New System.Windows.Forms.MenuItem()
        Me.miEditBar2 = New System.Windows.Forms.MenuItem()
        Me.miEditSelectAll = New System.Windows.Forms.MenuItem()
        Me.miView = New System.Windows.Forms.MenuItem()
        Me.miViewOpen = New System.Windows.Forms.MenuItem()
        Me.miViewPropertyPage = New System.Windows.Forms.MenuItem()
        Me.miViewBar1 = New System.Windows.Forms.MenuItem()
        Me.miLayoutRuler = New System.Windows.Forms.MenuItem()
        Me.miLayoutGrid = New System.Windows.Forms.MenuItem()
        Me.miViewBar2 = New System.Windows.Forms.MenuItem()
        Me.miLayoutSnapToGrid = New System.Windows.Forms.MenuItem()
        Me.miLayoutLockControls = New System.Windows.Forms.MenuItem()
        Me.miViewBar3 = New System.Windows.Forms.MenuItem()
        Me.miLayoutPrintableView = New System.Windows.Forms.MenuItem()
        Me.miLayoutFormView = New System.Windows.Forms.MenuItem()
        Me.miViewBar4 = New System.Windows.Forms.MenuItem()
        Me.miLayoutPageHeader = New System.Windows.Forms.MenuItem()
        Me.miLayoutGroupHeader = New System.Windows.Forms.MenuItem()
        Me.miLayoutDetail = New System.Windows.Forms.MenuItem()
        Me.miLayoutGroupFooter = New System.Windows.Forms.MenuItem()
        Me.miLayoutPageFooter = New System.Windows.Forms.MenuItem()
        Me.miViewBar5 = New System.Windows.Forms.MenuItem()
        Me.miMembersAlignToGrid = New System.Windows.Forms.MenuItem()
        Me.miMembersSizeToGrid = New System.Windows.Forms.MenuItem()
        Me.miViewBar6 = New System.Windows.Forms.MenuItem()
        Me.miMembersBringToFront = New System.Windows.Forms.MenuItem()
        Me.miMembersSendToBack = New System.Windows.Forms.MenuItem()
        Me.tbPropertyPage = New System.Windows.Forms.ToolBarButton()
        Me.tbSep4 = New System.Windows.Forms.ToolBarButton()
        Me.tbRedo = New System.Windows.Forms.ToolBarButton()
        Me.tbSep1 = New System.Windows.Forms.ToolBarButton()
        Me.tbPrintPreview = New System.Windows.Forms.ToolBarButton()
        Me.tbPrint = New System.Windows.Forms.ToolBarButton()
        Me.Toolbar1 = New System.Windows.Forms.ToolBar()
        Me.tbFormView = New System.Windows.Forms.ToolBarButton()
        Me.tbDatasheetView = New System.Windows.Forms.ToolBarButton()
        Me.tbSep2 = New System.Windows.Forms.ToolBarButton()
        Me.tbCut = New System.Windows.Forms.ToolBarButton()
        Me.tbCopy = New System.Windows.Forms.ToolBarButton()
        Me.tbPaste = New System.Windows.Forms.ToolBarButton()
        Me.tbSep3 = New System.Windows.Forms.ToolBarButton()
        Me.tbUndo = New System.Windows.Forms.ToolBarButton()
        Me.PageSetupDialog1 = New System.Windows.Forms.PageSetupDialog()
        Me.Panel2 = New System.Windows.Forms.Panel()
        Me.PropertyGrid1 = New System.Windows.Forms.PropertyGrid()
        Me.Title1 = New Avand.Title()
        Me.Splitter1 = New System.Windows.Forms.Splitter()
        Me.Panel1.SuspendLayout()
        Me.Panel2.SuspendLayout()
        Me.SuspendLayout()
        '
        'miButtonNext
        '
        Me.miButtonNext.Index = 7
        resources.ApplyResources(Me.miButtonNext, "miButtonNext")
        '
        'miButtonBrowse
        '
        Me.miButtonBrowse.Index = 6
        resources.ApplyResources(Me.miButtonBrowse, "miButtonBrowse")
        '
        'miButtonBar1
        '
        Me.miButtonBar1.Index = 5
        resources.ApplyResources(Me.miButtonBar1, "miButtonBar1")
        '
        'miButtonDelete
        '
        Me.miButtonDelete.Index = 4
        resources.ApplyResources(Me.miButtonDelete, "miButtonDelete")
        '
        'miButtonCancel
        '
        Me.miButtonCancel.Index = 3
        resources.ApplyResources(Me.miButtonCancel, "miButtonCancel")
        '
        'miButtonComputer
        '
        Me.miButtonComputer.Index = 8
        resources.ApplyResources(Me.miButtonComputer, "miButtonComputer")
        '
        'miButtonExpand
        '
        Me.miButtonExpand.Index = 9
        resources.ApplyResources(Me.miButtonExpand, "miButtonExpand")
        '
        'miButtonMultiSelect
        '
        Me.miButtonMultiSelect.Index = 10
        resources.ApplyResources(Me.miButtonMultiSelect, "miButtonMultiSelect")
        '
        'miInsertSub
        '
        Me.miInsertSub.Index = 8
        resources.ApplyResources(Me.miInsertSub, "miInsertSub")
        '
        'miInsertBar1
        '
        Me.miInsertBar1.Index = 7
        resources.ApplyResources(Me.miInsertBar1, "miInsertBar1")
        '
        'miButtonLookup
        '
        Me.miButtonLookup.Index = 13
        resources.ApplyResources(Me.miButtonLookup, "miButtonLookup")
        '
        'miButtonDrilldown
        '
        Me.miButtonDrilldown.Index = 12
        resources.ApplyResources(Me.miButtonDrilldown, "miButtonDrilldown")
        '
        'miButtonBar2
        '
        Me.miButtonBar2.Index = 11
        resources.ApplyResources(Me.miButtonBar2, "miButtonBar2")
        '
        'miButtonUpdate
        '
        Me.miButtonUpdate.Index = 2
        resources.ApplyResources(Me.miButtonUpdate, "miButtonUpdate")
        '
        'miButtonEdit
        '
        Me.miButtonEdit.Index = 1
        resources.ApplyResources(Me.miButtonEdit, "miButtonEdit")
        '
        'miInsert
        '
        Me.miInsert.Index = 3
        Me.miInsert.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miInsertLine, Me.miInsertFrame, Me.miInsertLabel, Me.miInsertTextBox, Me.miInsertPictureBox, Me.miInsertCheckBox, Me.miInsertButton, Me.miInsertBar1, Me.miInsertSub, Me.miInsertChart})
        Me.miInsert.MergeOrder = 4
        Me.miInsert.MergeType = System.Windows.Forms.MenuMerge.MergeItems
        resources.ApplyResources(Me.miInsert, "miInsert")
        '
        'miInsertLine
        '
        Me.miInsertLine.Index = 0
        resources.ApplyResources(Me.miInsertLine, "miInsertLine")
        '
        'miInsertFrame
        '
        Me.miInsertFrame.Index = 1
        resources.ApplyResources(Me.miInsertFrame, "miInsertFrame")
        '
        'miInsertLabel
        '
        Me.miInsertLabel.Index = 2
        resources.ApplyResources(Me.miInsertLabel, "miInsertLabel")
        '
        'miInsertTextBox
        '
        Me.miInsertTextBox.Index = 3
        resources.ApplyResources(Me.miInsertTextBox, "miInsertTextBox")
        '
        'miInsertPictureBox
        '
        Me.miInsertPictureBox.Index = 4
        resources.ApplyResources(Me.miInsertPictureBox, "miInsertPictureBox")
        '
        'miInsertCheckBox
        '
        Me.miInsertCheckBox.Index = 5
        resources.ApplyResources(Me.miInsertCheckBox, "miInsertCheckBox")
        '
        'miInsertButton
        '
        Me.miInsertButton.Index = 6
        Me.miInsertButton.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miButtonSelect, Me.miButtonEdit, Me.miButtonUpdate, Me.miButtonCancel, Me.miButtonDelete, Me.miButtonBar1, Me.miButtonBrowse, Me.miButtonNext, Me.miButtonComputer, Me.miButtonExpand, Me.miButtonMultiSelect, Me.miButtonBar2, Me.miButtonDrilldown, Me.miButtonLookup})
        resources.ApplyResources(Me.miInsertButton, "miInsertButton")
        '
        'miButtonSelect
        '
        Me.miButtonSelect.Index = 0
        resources.ApplyResources(Me.miButtonSelect, "miButtonSelect")
        '
        'miInsertChart
        '
        Me.miInsertChart.Index = 9
        resources.ApplyResources(Me.miInsertChart, "miInsertChart")
        '
        'miMembersProperties
        '
        Me.miMembersProperties.Index = 28
        resources.ApplyResources(Me.miMembersProperties, "miMembersProperties")
        '
        'miSectionProperties
        '
        Me.miSectionProperties.Index = 27
        resources.ApplyResources(Me.miSectionProperties, "miSectionProperties")
        '
        'miLayoutProperties
        '
        Me.miLayoutProperties.Index = 26
        resources.ApplyResources(Me.miLayoutProperties, "miLayoutProperties")
        '
        'miViewBar8
        '
        Me.miViewBar8.Index = 25
        resources.ApplyResources(Me.miViewBar8, "miViewBar8")
        '
        'Panel1
        '
        Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.Panel1.Controls.Add(Me.Designer1)
        resources.ApplyResources(Me.Panel1, "Panel1")
        Me.Panel1.Name = "Panel1"
        '
        'Designer1
        '
        Me.Designer1.AllowDrop = True
        Me.Designer1.BackColor = System.Drawing.SystemColors.AppWorkspace
        resources.ApplyResources(Me.Designer1, "Designer1")
        Me.Designer1.Name = "Designer1"
        Me.Designer1.Table = Nothing
        Me.Designer1.User = Nothing
        '
        'ContextMenu1
        '
        '
        'ciButtonComputer
        '
        Me.ciButtonComputer.Index = 8
        resources.ApplyResources(Me.ciButtonComputer, "ciButtonComputer")
        '
        'ciButtonNext
        '
        Me.ciButtonNext.Index = 7
        resources.ApplyResources(Me.ciButtonNext, "ciButtonNext")
        '
        'ciButtonBrowse
        '
        Me.ciButtonBrowse.Index = 6
        resources.ApplyResources(Me.ciButtonBrowse, "ciButtonBrowse")
        '
        'ciButtonBar1
        '
        Me.ciButtonBar1.Index = 5
        resources.ApplyResources(Me.ciButtonBar1, "ciButtonBar1")
        '
        'ciButtonDelete
        '
        Me.ciButtonDelete.Index = 4
        resources.ApplyResources(Me.ciButtonDelete, "ciButtonDelete")
        '
        'ciButtonExpand
        '
        Me.ciButtonExpand.Index = 9
        resources.ApplyResources(Me.ciButtonExpand, "ciButtonExpand")
        '
        'ciButtonMultiSelect
        '
        Me.ciButtonMultiSelect.Index = 10
        resources.ApplyResources(Me.ciButtonMultiSelect, "ciButtonMultiSelect")
        '
        'ciButtonBar2
        '
        Me.ciButtonBar2.Index = 11
        resources.ApplyResources(Me.ciButtonBar2, "ciButtonBar2")
        '
        'tbChart
        '
        resources.ApplyResources(Me.tbChart, "tbChart")
        Me.tbChart.Name = "tbChart"
        '
        'tbSub
        '
        resources.ApplyResources(Me.tbSub, "tbSub")
        Me.tbSub.Name = "tbSub"
        '
        'tbSep22
        '
        Me.tbSep22.Name = "tbSep22"
        Me.tbSep22.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'ciButtonLookup
        '
        Me.ciButtonLookup.Index = 13
        resources.ApplyResources(Me.ciButtonLookup, "ciButtonLookup")
        '
        'ciButtonDrillDown
        '
        Me.ciButtonDrillDown.Index = 12
        resources.ApplyResources(Me.ciButtonDrillDown, "ciButtonDrillDown")
        '
        'ciButtonCancel
        '
        Me.ciButtonCancel.Index = 3
        resources.ApplyResources(Me.ciButtonCancel, "ciButtonCancel")
        '
        'ciButtonUpdate
        '
        Me.ciButtonUpdate.Index = 2
        resources.ApplyResources(Me.ciButtonUpdate, "ciButtonUpdate")
        '
        'tbFrame
        '
        resources.ApplyResources(Me.tbFrame, "tbFrame")
        Me.tbFrame.Name = "tbFrame"
        '
        'tbLine
        '
        resources.ApplyResources(Me.tbLine, "tbLine")
        Me.tbLine.Name = "tbLine"
        '
        'tbSep21
        '
        Me.tbSep21.Name = "tbSep21"
        Me.tbSep21.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'tbPointer
        '
        resources.ApplyResources(Me.tbPointer, "tbPointer")
        Me.tbPointer.Name = "tbPointer"
        Me.tbPointer.Pushed = True
        '
        'Toolbar2
        '
        resources.ApplyResources(Me.Toolbar2, "Toolbar2")
        Me.Toolbar2.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbPointer, Me.tbSep21, Me.tbLine, Me.tbFrame, Me.tbLabel, Me.tbTextBox, Me.tbPictureBox, Me.tbCheckBox, Me.tbButton, Me.tbSep22, Me.tbSub, Me.tbChart})
        Me.Toolbar2.Divider = False
        Me.Toolbar2.ImageList = Me.ImageList1
        Me.Toolbar2.Name = "Toolbar2"
        '
        'tbLabel
        '
        resources.ApplyResources(Me.tbLabel, "tbLabel")
        Me.tbLabel.Name = "tbLabel"
        '
        'tbTextBox
        '
        resources.ApplyResources(Me.tbTextBox, "tbTextBox")
        Me.tbTextBox.Name = "tbTextBox"
        '
        'tbPictureBox
        '
        resources.ApplyResources(Me.tbPictureBox, "tbPictureBox")
        Me.tbPictureBox.Name = "tbPictureBox"
        '
        'tbCheckBox
        '
        resources.ApplyResources(Me.tbCheckBox, "tbCheckBox")
        Me.tbCheckBox.Name = "tbCheckBox"
        '
        'tbButton
        '
        Me.tbButton.DropDownMenu = Me.ContextMenu3
        resources.ApplyResources(Me.tbButton, "tbButton")
        Me.tbButton.Name = "tbButton"
        Me.tbButton.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton
        '
        'ContextMenu3
        '
        Me.ContextMenu3.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.ciButtonSelect, Me.ciButtonEdit, Me.ciButtonUpdate, Me.ciButtonCancel, Me.ciButtonDelete, Me.ciButtonBar1, Me.ciButtonBrowse, Me.ciButtonNext, Me.ciButtonComputer, Me.ciButtonExpand, Me.ciButtonMultiSelect, Me.ciButtonBar2, Me.ciButtonDrillDown, Me.ciButtonLookup})
        '
        'ciButtonSelect
        '
        Me.ciButtonSelect.Index = 0
        resources.ApplyResources(Me.ciButtonSelect, "ciButtonSelect")
        '
        'ciButtonEdit
        '
        Me.ciButtonEdit.Index = 1
        resources.ApplyResources(Me.ciButtonEdit, "ciButtonEdit")
        '
        'ImageList1
        '
        Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
        Me.ImageList1.Images.SetKeyName(0, "")
        Me.ImageList1.Images.SetKeyName(1, "")
        Me.ImageList1.Images.SetKeyName(2, "")
        Me.ImageList1.Images.SetKeyName(3, "")
        Me.ImageList1.Images.SetKeyName(4, "")
        Me.ImageList1.Images.SetKeyName(5, "")
        Me.ImageList1.Images.SetKeyName(6, "")
        Me.ImageList1.Images.SetKeyName(7, "")
        Me.ImageList1.Images.SetKeyName(8, "")
        Me.ImageList1.Images.SetKeyName(9, "")
        Me.ImageList1.Images.SetKeyName(10, "")
        Me.ImageList1.Images.SetKeyName(11, "")
        Me.ImageList1.Images.SetKeyName(12, "")
        Me.ImageList1.Images.SetKeyName(13, "")
        Me.ImageList1.Images.SetKeyName(14, "")
        Me.ImageList1.Images.SetKeyName(15, "")
        Me.ImageList1.Images.SetKeyName(16, "")
        Me.ImageList1.Images.SetKeyName(17, "")
        Me.ImageList1.Images.SetKeyName(18, "")
        Me.ImageList1.Images.SetKeyName(19, "")
        Me.ImageList1.Images.SetKeyName(20, "")
        '
        'miMembersChangeTo
        '
        resources.ApplyResources(Me.miMembersChangeTo, "miMembersChangeTo")
        Me.miMembersChangeTo.Index = 24
        '
        'miViewBar7
        '
        Me.miViewBar7.Index = 23
        resources.ApplyResources(Me.miViewBar7, "miViewBar7")
        '
        'miFileBar1
        '
        Me.miFileBar1.Index = 1
        Me.miFileBar1.MergeOrder = 3
        resources.ApplyResources(Me.miFileBar1, "miFileBar1")
        '
        'miFileClose
        '
        Me.miFileClose.Index = 0
        Me.miFileClose.MergeOrder = 2
        resources.ApplyResources(Me.miFileClose, "miFileClose")
        '
        'miFile
        '
        Me.miFile.Index = 0
        Me.miFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miFileClose, Me.miFileBar1, Me.miFilePageSetup, Me.miFilePrintPreview, Me.miFilePrint, Me.miFileBar2, Me.miFileFormView, Me.miFileDatasheetView})
        Me.miFile.MergeOrder = 1
        Me.miFile.MergeType = System.Windows.Forms.MenuMerge.MergeItems
        resources.ApplyResources(Me.miFile, "miFile")
        '
        'miFilePageSetup
        '
        Me.miFilePageSetup.Index = 2
        Me.miFilePageSetup.MergeOrder = 4
        resources.ApplyResources(Me.miFilePageSetup, "miFilePageSetup")
        '
        'miFilePrintPreview
        '
        Me.miFilePrintPreview.Index = 3
        Me.miFilePrintPreview.MergeOrder = 5
        resources.ApplyResources(Me.miFilePrintPreview, "miFilePrintPreview")
        '
        'miFilePrint
        '
        Me.miFilePrint.Index = 4
        Me.miFilePrint.MergeOrder = 6
        resources.ApplyResources(Me.miFilePrint, "miFilePrint")
        '
        'miFileBar2
        '
        Me.miFileBar2.Index = 5
        Me.miFileBar2.MergeOrder = 7
        resources.ApplyResources(Me.miFileBar2, "miFileBar2")
        '
        'miFileFormView
        '
        Me.miFileFormView.Index = 6
        Me.miFileFormView.MergeOrder = 8
        resources.ApplyResources(Me.miFileFormView, "miFileFormView")
        '
        'miFileDatasheetView
        '
        resources.ApplyResources(Me.miFileDatasheetView, "miFileDatasheetView")
        Me.miFileDatasheetView.Index = 7
        Me.miFileDatasheetView.MergeOrder = 9
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miFile, Me.miEdit, Me.miView, Me.miInsert})
        '
        'miEdit
        '
        Me.miEdit.Index = 1
        Me.miEdit.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miEditUndo, Me.miEditRedo, Me.miEditBar1, Me.miEditCut, Me.miEditCopy, Me.miEditPaste, Me.miEditBar2, Me.miEditSelectAll})
        Me.miEdit.MergeOrder = 2
        Me.miEdit.MergeType = System.Windows.Forms.MenuMerge.MergeItems
        resources.ApplyResources(Me.miEdit, "miEdit")
        '
        'miEditUndo
        '
        resources.ApplyResources(Me.miEditUndo, "miEditUndo")
        Me.miEditUndo.Index = 0
        '
        'miEditRedo
        '
        resources.ApplyResources(Me.miEditRedo, "miEditRedo")
        Me.miEditRedo.Index = 1
        '
        'miEditBar1
        '
        Me.miEditBar1.Index = 2
        resources.ApplyResources(Me.miEditBar1, "miEditBar1")
        '
        'miEditCut
        '
        Me.miEditCut.Index = 3
        resources.ApplyResources(Me.miEditCut, "miEditCut")
        '
        'miEditCopy
        '
        Me.miEditCopy.Index = 4
        resources.ApplyResources(Me.miEditCopy, "miEditCopy")
        '
        'miEditPaste
        '
        Me.miEditPaste.Index = 5
        resources.ApplyResources(Me.miEditPaste, "miEditPaste")
        '
        'miEditBar2
        '
        Me.miEditBar2.Index = 6
        resources.ApplyResources(Me.miEditBar2, "miEditBar2")
        '
        'miEditSelectAll
        '
        Me.miEditSelectAll.Index = 7
        resources.ApplyResources(Me.miEditSelectAll, "miEditSelectAll")
        '
        'miView
        '
        Me.miView.Index = 2
        Me.miView.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miViewOpen, Me.miViewPropertyPage, Me.miViewBar1, Me.miLayoutRuler, Me.miLayoutGrid, Me.miViewBar2, Me.miLayoutSnapToGrid, Me.miLayoutLockControls, Me.miViewBar3, Me.miLayoutPrintableView, Me.miLayoutFormView, Me.miViewBar4, Me.miLayoutPageHeader, Me.miLayoutGroupHeader, Me.miLayoutDetail, Me.miLayoutGroupFooter, Me.miLayoutPageFooter, Me.miViewBar5, Me.miMembersAlignToGrid, Me.miMembersSizeToGrid, Me.miViewBar6, Me.miMembersBringToFront, Me.miMembersSendToBack, Me.miViewBar7, Me.miMembersChangeTo, Me.miViewBar8, Me.miLayoutProperties, Me.miSectionProperties, Me.miMembersProperties})
        Me.miView.MergeOrder = 3
        Me.miView.MergeType = System.Windows.Forms.MenuMerge.MergeItems
        resources.ApplyResources(Me.miView, "miView")
        '
        'miViewOpen
        '
        Me.miViewOpen.Index = 0
        resources.ApplyResources(Me.miViewOpen, "miViewOpen")
        '
        'miViewPropertyPage
        '
        Me.miViewPropertyPage.Index = 1
        resources.ApplyResources(Me.miViewPropertyPage, "miViewPropertyPage")
        '
        'miViewBar1
        '
        Me.miViewBar1.Index = 2
        resources.ApplyResources(Me.miViewBar1, "miViewBar1")
        '
        'miLayoutRuler
        '
        Me.miLayoutRuler.Index = 3
        resources.ApplyResources(Me.miLayoutRuler, "miLayoutRuler")
        '
        'miLayoutGrid
        '
        Me.miLayoutGrid.Index = 4
        resources.ApplyResources(Me.miLayoutGrid, "miLayoutGrid")
        '
        'miViewBar2
        '
        Me.miViewBar2.Index = 5
        resources.ApplyResources(Me.miViewBar2, "miViewBar2")
        '
        'miLayoutSnapToGrid
        '
        Me.miLayoutSnapToGrid.Index = 6
        resources.ApplyResources(Me.miLayoutSnapToGrid, "miLayoutSnapToGrid")
        '
        'miLayoutLockControls
        '
        Me.miLayoutLockControls.Index = 7
        resources.ApplyResources(Me.miLayoutLockControls, "miLayoutLockControls")
        '
        'miViewBar3
        '
        Me.miViewBar3.Index = 8
        resources.ApplyResources(Me.miViewBar3, "miViewBar3")
        '
        'miLayoutPrintableView
        '
        Me.miLayoutPrintableView.Index = 9
        resources.ApplyResources(Me.miLayoutPrintableView, "miLayoutPrintableView")
        '
        'miLayoutFormView
        '
        Me.miLayoutFormView.Index = 10
        resources.ApplyResources(Me.miLayoutFormView, "miLayoutFormView")
        '
        'miViewBar4
        '
        Me.miViewBar4.Index = 11
        resources.ApplyResources(Me.miViewBar4, "miViewBar4")
        '
        'miLayoutPageHeader
        '
        Me.miLayoutPageHeader.Index = 12
        resources.ApplyResources(Me.miLayoutPageHeader, "miLayoutPageHeader")
        '
        'miLayoutGroupHeader
        '
        Me.miLayoutGroupHeader.Index = 13
        resources.ApplyResources(Me.miLayoutGroupHeader, "miLayoutGroupHeader")
        '
        'miLayoutDetail
        '
        Me.miLayoutDetail.Index = 14
        resources.ApplyResources(Me.miLayoutDetail, "miLayoutDetail")
        '
        'miLayoutGroupFooter
        '
        Me.miLayoutGroupFooter.Index = 15
        resources.ApplyResources(Me.miLayoutGroupFooter, "miLayoutGroupFooter")
        '
        'miLayoutPageFooter
        '
        Me.miLayoutPageFooter.Index = 16
        resources.ApplyResources(Me.miLayoutPageFooter, "miLayoutPageFooter")
        '
        'miViewBar5
        '
        Me.miViewBar5.Index = 17
        resources.ApplyResources(Me.miViewBar5, "miViewBar5")
        '
        'miMembersAlignToGrid
        '
        Me.miMembersAlignToGrid.Index = 18
        resources.ApplyResources(Me.miMembersAlignToGrid, "miMembersAlignToGrid")
        '
        'miMembersSizeToGrid
        '
        Me.miMembersSizeToGrid.Index = 19
        resources.ApplyResources(Me.miMembersSizeToGrid, "miMembersSizeToGrid")
        '
        'miViewBar6
        '
        Me.miViewBar6.Index = 20
        resources.ApplyResources(Me.miViewBar6, "miViewBar6")
        '
        'miMembersBringToFront
        '
        Me.miMembersBringToFront.Index = 21
        resources.ApplyResources(Me.miMembersBringToFront, "miMembersBringToFront")
        '
        'miMembersSendToBack
        '
        Me.miMembersSendToBack.Index = 22
        resources.ApplyResources(Me.miMembersSendToBack, "miMembersSendToBack")
        '
        'tbPropertyPage
        '
        resources.ApplyResources(Me.tbPropertyPage, "tbPropertyPage")
        Me.tbPropertyPage.Name = "tbPropertyPage"
        '
        'tbSep4
        '
        Me.tbSep4.Name = "tbSep4"
        Me.tbSep4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'tbRedo
        '
        resources.ApplyResources(Me.tbRedo, "tbRedo")
        Me.tbRedo.Name = "tbRedo"
        Me.tbRedo.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton
        '
        'tbSep1
        '
        Me.tbSep1.Name = "tbSep1"
        Me.tbSep1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'tbPrintPreview
        '
        resources.ApplyResources(Me.tbPrintPreview, "tbPrintPreview")
        Me.tbPrintPreview.Name = "tbPrintPreview"
        '
        'tbPrint
        '
        resources.ApplyResources(Me.tbPrint, "tbPrint")
        Me.tbPrint.Name = "tbPrint"
        '
        'Toolbar1
        '
        resources.ApplyResources(Me.Toolbar1, "Toolbar1")
        Me.Toolbar1.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbPrint, Me.tbPrintPreview, Me.tbSep1, Me.tbFormView, Me.tbDatasheetView, Me.tbSep2, Me.tbCut, Me.tbCopy, Me.tbPaste, Me.tbSep3, Me.tbUndo, Me.tbRedo, Me.tbSep4, Me.tbPropertyPage})
        Me.Toolbar1.ImageList = Me.ImageList1
        Me.Toolbar1.Name = "Toolbar1"
        '
        'tbFormView
        '
        resources.ApplyResources(Me.tbFormView, "tbFormView")
        Me.tbFormView.Name = "tbFormView"
        '
        'tbDatasheetView
        '
        resources.ApplyResources(Me.tbDatasheetView, "tbDatasheetView")
        Me.tbDatasheetView.Name = "tbDatasheetView"
        '
        'tbSep2
        '
        Me.tbSep2.Name = "tbSep2"
        Me.tbSep2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'tbCut
        '
        resources.ApplyResources(Me.tbCut, "tbCut")
        Me.tbCut.Name = "tbCut"
        '
        'tbCopy
        '
        resources.ApplyResources(Me.tbCopy, "tbCopy")
        Me.tbCopy.Name = "tbCopy"
        '
        'tbPaste
        '
        resources.ApplyResources(Me.tbPaste, "tbPaste")
        Me.tbPaste.Name = "tbPaste"
        '
        'tbSep3
        '
        Me.tbSep3.Name = "tbSep3"
        Me.tbSep3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator
        '
        'tbUndo
        '
        resources.ApplyResources(Me.tbUndo, "tbUndo")
        Me.tbUndo.Name = "tbUndo"
        Me.tbUndo.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton
        '
        'Panel2
        '
        Me.Panel2.BackColor = System.Drawing.SystemColors.Control
        Me.Panel2.Controls.Add(Me.PropertyGrid1)
        Me.Panel2.Controls.Add(Me.Title1)
        resources.ApplyResources(Me.Panel2, "Panel2")
        Me.Panel2.Name = "Panel2"
        '
        'PropertyGrid1
        '
        resources.ApplyResources(Me.PropertyGrid1, "PropertyGrid1")
        Me.PropertyGrid1.LineColor = System.Drawing.SystemColors.ScrollBar
        Me.PropertyGrid1.Name = "PropertyGrid1"
        '
        'Title1
        '
        resources.ApplyResources(Me.Title1, "Title1")
        Me.Title1.Name = "Title1"
        Me.Title1.Selected = False
        '
        'Splitter1
        '
        Me.Splitter1.BackColor = System.Drawing.SystemColors.Control
        resources.ApplyResources(Me.Splitter1, "Splitter1")
        Me.Splitter1.Name = "Splitter1"
        Me.Splitter1.TabStop = False
        '
        'Layout
        '
        resources.ApplyResources(Me, "$this")
        Me.Controls.Add(Me.Splitter1)
        Me.Controls.Add(Me.Panel1)
        Me.Controls.Add(Me.Toolbar2)
        Me.Controls.Add(Me.Toolbar1)
        Me.Controls.Add(Me.Panel2)
        Me.KeyPreview = True
        Me.MaximizeBox = False
        Me.Menu = Me.MainMenu1
        Me.MinimizeBox = False
        Me.Name = "Layout"
        Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show
        Me.Panel1.ResumeLayout(False)
        Me.Panel2.ResumeLayout(False)
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region

    Private mChanged As Boolean
    Private mConnections As Model10.ConnectionCollection
    Private mForm As Avand.Presentation
    Private mOleDbConnection As OleDb.OleDbConnection

    Private Sub ContextMenu1_Popup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ContextMenu1.Popup
        ContextMenu1.MenuItems.Clear()
        ContextMenu1.MenuItems(ContextMenu1.MenuItems.Add(miEditCut.CloneMenu)).Shortcut = Shortcut.None
        ContextMenu1.MenuItems(ContextMenu1.MenuItems.Add(miEditCopy.CloneMenu)).Shortcut = Shortcut.None
        ContextMenu1.MenuItems(ContextMenu1.MenuItems.Add(miEditPaste.CloneMenu)).Shortcut = Shortcut.None
        ContextMenu1.MenuItems.Add(miEditBar1.CloneMenu)
        If Designer1.SelectedMembersCount = 0 Then
            If Designer1.SelectedSection Is Nothing Then
                ContextMenu1.MenuItems.Add(miLayoutRuler.CloneMenu)
                ContextMenu1.MenuItems.Add(miLayoutGrid.CloneMenu)
                ContextMenu1.MenuItems.Add("-")
                ContextMenu1.MenuItems.Add(miLayoutSnapToGrid.CloneMenu)
                ContextMenu1.MenuItems.Add(miLayoutLockControls.CloneMenu)
                ContextMenu1.MenuItems.Add("-")
                ContextMenu1.MenuItems.Add(miLayoutPageHeader.CloneMenu)
                ContextMenu1.MenuItems.Add(miLayoutGroupHeader.CloneMenu)
                ContextMenu1.MenuItems.Add(miLayoutDetail.CloneMenu)
                ContextMenu1.MenuItems.Add(miLayoutGroupFooter.CloneMenu)
                ContextMenu1.MenuItems.Add(miLayoutPageFooter.CloneMenu)
                ContextMenu1.MenuItems.Add("-")
                ContextMenu1.MenuItems.Add(miInsert.CloneMenu)
                ContextMenu1.MenuItems.Add("-")
                ContextMenu1.MenuItems.Add(miLayoutProperties.CloneMenu)
            Else
                ContextMenu1.MenuItems.Add(miInsert.CloneMenu)
                ContextMenu1.MenuItems.Add("-")
                ContextMenu1.MenuItems.Add(miSectionProperties.CloneMenu)
            End If
        Else
            ContextMenu1.MenuItems.Add(miMembersAlignToGrid.CloneMenu)
            ContextMenu1.MenuItems.Add(miMembersSizeToGrid.CloneMenu)
            ContextMenu1.MenuItems.Add("-")
            ContextMenu1.MenuItems.Add(miMembersBringToFront.CloneMenu)
            ContextMenu1.MenuItems.Add(miMembersSendToBack.CloneMenu)
            ContextMenu1.MenuItems.Add("-")
            ContextMenu1.MenuItems.Add(miMembersChangeTo.CloneMenu)
            ContextMenu1.MenuItems.Add("-")
            ContextMenu1.MenuItems.Add(miInsert.CloneMenu)
            ContextMenu1.MenuItems.Add("-")
            ContextMenu1.MenuItems.Add(miMembersProperties.CloneMenu)
        End If
    End Sub

    Private Sub Designer1_TableDoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.TableDoubleClick
        miLayoutProperties.PerformClick()
    End Sub
    Private Sub Designer1_SectionDoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.SectionDoubleClick
        miSectionProperties.PerformClick()
    End Sub
    Private Sub Designer1_MembersDoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.MembersDoubleClick
        miMembersProperties.PerformClick()
    End Sub

    Private Sub Designer1_TableSelected(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.TableSelected
        SetMenu()
    End Sub
    Private Sub Designer1_SectionSelected(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.SectionSelected
        SetMenu()
    End Sub
    Private Sub Designer1_MembersSelected(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.MembersSelected
        SetMenu()
    End Sub

    Private Sub Designer1_SelectedTableChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.SelectedTableChanged
        If Panel2.Visible Then SetProperties()
    End Sub
    Private Sub Designer1_SelectedSectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.SelectedSectionChanged
        If Panel2.Visible Then SetProperties()
    End Sub
    Private Sub Designer1_SelectedMembersChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.SelectedMembersChanged
        If Panel2.Visible Then SetProperties()
    End Sub

    Private Sub Designer1_InsertingFinished(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.InsertingFinished
        Unpush()
        tbPointer.Pushed = True
    End Sub
    Private Sub Designer1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Designer1.MouseDown
        Me.Select() : Designer1.Select()
    End Sub
    Private Sub Designer1_RequestDelete(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.RequestDelete
        'miEditCut.PerformClick() >>>
        If Designer1.SelectedMembersCount = 0 Then
            If Designer1.SelectedSection Is Nothing Then
            Else
                Dim foo As String = Designer1.SelectedSection.GetName
                Dim str As String = GetSystemResource("Section." & foo)
                Dim rlt As DialogResult = DialogResult.OK
                If Designer1.SelectedSection.Members.Count > 0 Then
                    rlt = MessageBox.Show("'" & str & "' and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                End If
                If rlt = DialogResult.OK Then
                    Select Case foo
                        Case "PageHeader"
                            Designer1.RemovePageHeader()
                            miLayoutPageHeader.Checked = False
                        Case "GroupHeader"
                            Designer1.RemoveGroupHeader()
                            miLayoutGroupHeader.Checked = False
                        Case "Detail"
                            Designer1.RemoveDetail()
                            miLayoutDetail.Checked = False
                        Case "GroupFooter"
                            Designer1.RemoveGroupFooter()
                            miLayoutGroupFooter.Checked = False
                        Case "PageFooter"
                            Designer1.RemovePageFooter()
                            miLayoutPageFooter.Checked = False
                    End Select
                End If
            End If
        Else
            'miEditCopy.PerformClick()
            Designer1.DeleteSelectedMembers()
        End If
    End Sub
    Private Sub Designer1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Designer1.ValueChanged
        Changed = True
    End Sub

    Private Sub PropertyGrid1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PropertyGrid1.Enter
        Title1.Selected = True
    End Sub
    Private Sub PropertyGrid1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PropertyGrid1.Leave
        Title1.Selected = False
    End Sub
    Private Sub PropertyGrid1_PropertyValueChanged(ByVal s As Object, ByVal e As System.Windows.Forms.PropertyValueChangedEventArgs) Handles PropertyGrid1.PropertyValueChanged
        'If TypeOf mForm Is Avand.Layout Then
        'Dim frm As Avand.Layout = CType(mForm, Avand.Layout)
        Designer1.Reset()
        If TypeOf PropertyGrid1.SelectedObject Is Model10.Table Then
            Dim tbl As Model10.Table = CType(PropertyGrid1.SelectedObject, Model10.Table)
            Me.Text = GetSystemResource("Layout.Title") & " - " & Designer1.Table.Presentation.Name & "\" & tbl.Name

            Dim tn As TreeNode
            For Each tn In Form.TreeView1.Nodes(0).Nodes(1).Nodes
                If tn.Tag Is tbl Then
                    tn.Text = tbl.Name
                    Exit For
                End If
            Next : tn = Nothing

            tbl = Nothing
        End If
        'frm = Nothing
        'ElseIf TypeOf mForm Is Avand.Presentation Then
        'Dim tv As TreeView = CType(mForm, Avand.Presentation).TreeView1
        'Select Case tv.SelectedNode.ImageIndex
        '    Case 2 'Connection
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, Model10.Connection).Name
        '    Case 4 'Table
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, Model10.Table).Name()
        '    Case 7 'Parameter
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, Model10.Parameter).Name()
        '    Case 9 'Compute
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, Model10.Compute).Name()
        '    Case 11 'Column
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, DataColumn).ColumnName()
        '    Case 13, 14 'Constraint
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, Constraint).ConstraintName()
        '    Case 16 'Relation
        '        tv.SelectedNode.Text = CType(PropertyGrid1.SelectedObject, Model10.Relation).Name()
        'End Select
        'Me.Text = tv.SelectedNode.Text & " Properties"
        'tv = Nothing
        'End If
    End Sub
    Private Sub Title1_ButtonClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Title1.ButtonClick
        Panel2.Visible = False
        Splitter1.Visible = False
    End Sub
    Private Sub Title1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Title1.MouseDown
        PropertyGrid1.Select()
    End Sub

    Private Sub ciButtonSelect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonSelect.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Select), "", True)
    End Sub
    Private Sub ciButtonEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonEdit.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Edit), "", True)
    End Sub
    Private Sub ciButtonUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonUpdate.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Update), "", True)
    End Sub
    Private Sub ciButtonDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonDelete.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Delete), "", True)
    End Sub
    Private Sub ciButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonCancel.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Cancel), "", True)
    End Sub
    Private Sub ciButtonBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonBrowse.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Browse), "", True)
    End Sub
    Private Sub ciButtonComputer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonComputer.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Computer), "", True)
    End Sub
    Private Sub ciButtonExpand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonExpand.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Expand), "", True)
    End Sub
    Private Sub ciButtonNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonNext.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Next), "", True)
    End Sub
    Private Sub ciButtonMultiSelect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonMultiSelect.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.MultiSelect), "", True)
    End Sub
    Private Sub ciButtonDrillDown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonDrillDown.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Drilldown), "", True)
    End Sub
    Private Sub ciButtonLookup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ciButtonLookup.Click
        Unpush()
        Designer1.InsertMember(GetType(Model10.Lookup), "", True)
    End Sub

    Private Sub Layout_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
        mForm.Layouts.Remove(Me)
    End Sub

    Private Sub Layout_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Size = Designer1.Table.Size
        'TinyErrorMessage()
    End Sub
    Private Sub Layout_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
        If Designer1.Table IsNot Nothing And Me.Visible Then
            If Designer1.Table.Size <> Me.Size Then
                Designer1.Table.Size = Me.Size
                Changed = True
            End If
        End If
    End Sub

    Private Sub miFileClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miFileClose.Click
        Me.Close()
    End Sub
    Private Sub miFilePageSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miFilePageSetup.Click
        Application.DoEvents()
        Cursor.Current = Cursors.WaitCursor
        '----------------------------------
        Try
            Designer1.Table.WritePageSettings(PageSetupDialog1.PageSettings)
            If PageSetupDialog1.ShowDialog(Me) = DialogResult.OK Then
                Designer1.Table.ReadPageSettings(PageSetupDialog1.PageSettings)
                Changed = True
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        '----------------------------------
        Cursor.Current = Cursors.Default
    End Sub
    Private Sub miFilePrintPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miFilePrintPreview.Click
        Application.DoEvents()
        Cursor.Current = Cursors.WaitCursor
        '----------------------------------
        Try
            Dim tbl As Model10.Table = Designer1.Table 'CType(Model10.Database.Clone(Designer1.Table), Model10.Table)

            If Not mForm.View Is Nothing Then If Not mForm.View.Visible Then mForm.View = Nothing
            If mForm.View Is Nothing Then
                If tbl.Presentation.DataViewManager Is Nothing Then tbl.Presentation.DataViewManager = New DataViewManager(tbl.Presentation.DataSet)
                mForm.View = New Avand.Preview(tbl.Size, mForm.User, Me, New ArrayList, New Model10.Current(tbl, Nothing, tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable), Nothing, Nothing, 1, 1), Nothing)
                mForm.View.Size = tbl.Size
                mForm.View.Show()
            Else
                If TypeOf mForm.View Is Avand.Preview Then
                    Dim pv As Avand.Preview = CType(mForm.View, Avand.Preview)
                    pv.Current.Table = tbl
                    pv.Current.DataView = tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable)
                    pv.Fill()
                    pv = Nothing
                Else
                    Dim s As Size = mForm.View.Size
                    Dim l As Point = mForm.View.Location
                    mForm.View.Close() : mForm.View = Nothing
                    mForm.View = New Avand.Preview(s, mForm.User, Me, New ArrayList, New Model10.Current(tbl, Nothing, tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable), Nothing, Nothing, 1, 1), Nothing)
                    mForm.View.StartPosition = FormStartPosition.Manual
                    mForm.View.Location = l
                    mForm.View.Size = s
                    mForm.View.Show()
                End If
                mForm.View.Select()
            End If

            tbl = Nothing
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        '----------------------------------
        Cursor.Current = Cursors.Default
    End Sub
    Private Sub miFilePrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miFilePrint.Click
        Application.DoEvents()
        Cursor.Current = Cursors.WaitCursor
        '----------------------------------
        Try
            Dim tbl As Model10.Table = Designer1.Table 'CType(Model10.Database.Clone(Designer1.Table), Model10.Table)

            If tbl.Presentation.DataViewManager Is Nothing Then tbl.Presentation.DataViewManager = New DataViewManager(tbl.Presentation.DataSet)
            Dim frm As New Avand.Preview(tbl.Size, mForm.User, Me, New ArrayList, New Model10.Current(tbl, Nothing, tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable), Nothing, Nothing, 1, 1), Nothing)
            frm.miFilePrint.PerformClick()
            frm.Close() : frm = Nothing

            tbl = Nothing
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        '----------------------------------
        Cursor.Current = Cursors.Default
    End Sub
    Private Sub miFileFormView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miFileFormView.Click
        Application.DoEvents()
        Cursor.Current = Cursors.WaitCursor
        '----------------------------------
        Try
            Dim tbl As Model10.Table = Designer1.Table 'CType(Model10.Database.Clone(Designer1.Table), Model10.Table)

            If Not mForm.View Is Nothing Then If Not mForm.View.Visible Then mForm.View = Nothing
            If mForm.View Is Nothing Then
                If tbl.Presentation.DataViewManager Is Nothing Then tbl.Presentation.DataViewManager = New DataViewManager(tbl.Presentation.DataSet)
                mForm.View = New Avand.FormView(tbl.Size, mForm.User, Me, New ArrayList, New Model10.Current(tbl, Nothing, tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable), Nothing, Nothing, 1, 1), Nothing, mOleDbConnection, mConnections)
                mForm.View.Size = tbl.Size
                mForm.View.Show()
            Else
                If TypeOf mForm.View Is Avand.FormView Then
                    Dim fv As Avand.FormView = CType(mForm.View, Avand.FormView)
                    fv.Grid1.Current.Table = tbl
                    fv.Grid1.Current.DataView = tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable)
                    fv.Fill(fv.Navigator1.Chain.Count = 1)
                    fv = Nothing
                Else
                    Dim s As Size = mForm.View.Size
                    Dim l As Point = mForm.View.Location
                    mForm.View.Close() : mForm.View = Nothing
                    mForm.View = New Avand.FormView(s, mForm.User, Me, New ArrayList, New Model10.Current(tbl, Nothing, tbl.Presentation.DataViewManager.CreateDataView(tbl.DataTable), Nothing, Nothing, 1, 1), Nothing, mOleDbConnection, mConnections)
                    mForm.View.StartPosition = FormStartPosition.Manual
                    mForm.View.Location = l
                    mForm.View.Size = s
                    mForm.View.Show()
                End If
                mForm.View.Select()
            End If

            tbl = Nothing
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        '----------------------------------
        Cursor.Current = Cursors.Default
    End Sub
    Private Sub miFileDatasheetView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miFileDatasheetView.Click

    End Sub

    Private Sub miEditUndo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miEditUndo.Click
        Changed = True
    End Sub
    Private Sub miEditRedo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miEditRedo.Click
        Changed = True
    End Sub
    Private Sub miEditCut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miEditCut.Click
        If Designer1.SelectedMembersCount = 0 Then
            If Designer1.SelectedSection Is Nothing Then
            Else
                Dim foo As String = Designer1.SelectedSection.GetName
                Dim str As String = GetSystemResource("Section." & foo)
                Dim rlt As DialogResult = DialogResult.OK
                If Designer1.SelectedSection.Members.Count > 0 Then
                    rlt = MessageBox.Show("'" & str & "' and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
                End If
                If rlt = DialogResult.OK Then
                    Select Case foo
                        Case "PageHeader"
                            Designer1.RemovePageHeader()
                            miLayoutPageHeader.Checked = False
                        Case "GroupHeader"
                            Designer1.RemoveGroupHeader()
                            miLayoutGroupHeader.Checked = False
                        Case "Detail"
                            Designer1.RemoveDetail()
                            miLayoutDetail.Checked = False
                        Case "GroupFooter"
                            Designer1.RemoveGroupFooter()
                            miLayoutGroupFooter.Checked = False
                        Case "PageFooter"
                            Designer1.RemovePageFooter()
                            miLayoutPageFooter.Checked = False
                    End Select
                End If
            End If
        Else
            miEditCopy.PerformClick()
            Designer1.DeleteSelectedMembers()
        End If
    End Sub
    Private Sub miEditCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miEditCopy.Click
        If Not Designer1.SelectedMembersCount = 0 Then
            Dim oldMS As Model10.Member() = Designer1.GetMembers
            Dim newMS(Designer1.SelectedMembersCount - 1) As Model10.Member
            Dim i As Integer
            For i = 0 To Designer1.SelectedMembersCount - 1
                newMS(i) = oldMS(i).Clone
            Next
            oldMS = Nothing
            Dim dobj As New DataObject(newMS)
            newMS = Nothing
            Clipboard.SetDataObject(dobj)
            dobj = Nothing
        End If
    End Sub
    Private Sub miEditPaste_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miEditPaste.Click
        If Not Designer1.SelectedSection Is Nothing Then
            If Clipboard.GetDataObject.GetDataPresent(GetType(Model10.Member())) Then
                Designer1.PasteMembers()
                Changed = True
            End If
        End If
    End Sub
    Private Sub miEditSelectAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miEditSelectAll.Click
        Designer1.SelectAll()
    End Sub

    Private Sub miViewOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miViewOpen.Click
        Try
            Dim prs As Model10.Presentation = CType(Model10.Database.Clone(mForm.Presentation), Model10.Presentation)
            prs.Id = mForm.Presentation.Id
            prs.Name = mForm.Presentation.Name
            prs.Path = mForm.Presentation.Path
            [Global].OpenPresentation(prs, mForm.User, Me, mOleDbConnection, mConnections)
            prs = Nothing
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
    Private Sub miViewPropertyPage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miViewPropertyPage.Click
        If Not Panel2.Visible Then
            SetProperties()

            Splitter1.Visible = True
            Panel2.Visible = True
        End If
        PropertyGrid1.Select()
    End Sub
    Private Sub miLayoutRuler_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutRuler.Click
        Designer1.Table.DisplayRulers = Not Designer1.Table.DisplayRulers
        miLayoutRuler.Checked = Designer1.Table.DisplayRulers
        Designer1.Display()
    End Sub
    Private Sub miLayoutGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutGrid.Click
        Designer1.Table.DisplayGrid = Not Designer1.Table.DisplayGrid
        miLayoutGrid.Checked = Designer1.Table.DisplayGrid
        Designer1.Display()
    End Sub
    Private Sub miLayoutSnapToGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutSnapToGrid.Click
        Designer1.Table.SnapToGrid = Not Designer1.Table.SnapToGrid
        miLayoutSnapToGrid.Checked = Designer1.Table.SnapToGrid
    End Sub
    Private Sub miLayoutLockControls_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutLockControls.Click
        Designer1.Table.Locked = Not Designer1.Table.Locked
        miLayoutLockControls.Checked = Designer1.Table.Locked
    End Sub
    Private Sub miLayoutPrintableView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutPrintableView.Click
        Designer1.Table.DesignerMode = Model10.DesignerMode.PrintableView
        miLayoutPrintableView.Checked = Designer1.Table.DesignerMode = Model10.DesignerMode.PrintableView
        miLayoutFormView.Checked = Not miLayoutPrintableView.Checked
        Designer1.Display()
    End Sub
    Private Sub miLayoutFormView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutFormView.Click
        Designer1.Table.DesignerMode = Model10.DesignerMode.FormView
        miLayoutFormView.Checked = Designer1.Table.DesignerMode = Model10.DesignerMode.FormView
        miLayoutPrintableView.Checked = Not miLayoutFormView.Checked
        Designer1.Display()
    End Sub
    Private Sub miLayoutPageHeader_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutPageHeader.Click
        If Designer1.Table.PageHeader Is Nothing Then
            Designer1.AddPageHeader()
            miLayoutPageHeader.Checked = True
        Else
            Dim rlt As DialogResult = DialogResult.OK
            If Designer1.Table.PageHeader.Members.Count > 0 Then
                rlt = MessageBox.Show("'Page Header Section'and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
            End If
            If rlt = DialogResult.OK Then
                Designer1.RemovePageHeader()
                miLayoutPageHeader.Checked = False
            End If
        End If
    End Sub
    Private Sub miLayoutGroupHeader_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutGroupHeader.Click
        If Designer1.Table.GroupHeader Is Nothing Then
            Designer1.AddGroupHeader()
            miLayoutGroupHeader.Checked = True
        Else
            Dim rlt As DialogResult = DialogResult.OK
            If Designer1.Table.GroupHeader.Members.Count > 0 Then
                rlt = MessageBox.Show("'Group Header Section'and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
            End If
            If rlt = DialogResult.OK Then
                Designer1.RemoveGroupHeader()
                miLayoutGroupHeader.Checked = False
            End If
        End If
    End Sub
    Private Sub miLayoutDetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutDetail.Click
        If Designer1.Table.Detail Is Nothing Then
            Designer1.AddDetail()
            miLayoutDetail.Checked = True
        Else
            Dim rlt As DialogResult = DialogResult.OK
            If Designer1.Table.Detail.Members.Count > 0 Then
                rlt = MessageBox.Show("'Detail Section'and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
            End If
            If rlt = DialogResult.OK Then
                Designer1.RemoveDetail()
                miLayoutDetail.Checked = False
            End If
        End If
    End Sub
    Private Sub miLayoutGroupFooter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutGroupFooter.Click
        If Designer1.Table.GroupFooter Is Nothing Then
            Designer1.AddGroupFooter()
            miLayoutGroupFooter.Checked = True
        Else
            Dim rlt As DialogResult = DialogResult.OK
            If Designer1.Table.GroupFooter.Members.Count > 0 Then
                rlt = MessageBox.Show("'Group Footer Section'and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
            End If
            If rlt = DialogResult.OK Then
                Designer1.RemoveGroupFooter()
                miLayoutGroupFooter.Checked = False
            End If
        End If
    End Sub
    Private Sub miLayoutPageFooter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutPageFooter.Click
        If Designer1.Table.PageFooter Is Nothing Then
            Designer1.AddPageFooter()
            miLayoutPageFooter.Checked = True
        Else
            Dim rlt As DialogResult = DialogResult.OK
            If Designer1.Table.PageFooter.Members.Count > 0 Then
                rlt = MessageBox.Show("'Page Footer Section'and all of it's members will be deleted.", "Avand", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
            End If
            If rlt = DialogResult.OK Then
                Designer1.RemovePageFooter()
                miLayoutPageFooter.Checked = False
            End If
        End If
    End Sub
    Private Sub miInsertLine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertLine.Click
        Designer1.InsertMember(GetType(Model10.Line))
    End Sub
    Private Sub miInsertFrame_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertFrame.Click
        Designer1.InsertMember(GetType(Model10.Frame))
    End Sub
    Private Sub miInsertLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertLabel.Click
        Designer1.InsertMember(GetType(Model10.Label))
    End Sub
    Private Sub miInsertTextBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertTextBox.Click
        Designer1.InsertMember(GetType(Model10.TextBox))
    End Sub
    Private Sub miInsertPictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertPictureBox.Click
        Designer1.InsertMember(GetType(Model10.PictureBox))
    End Sub
    Private Sub miInsertCheckBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertCheckBox.Click
        Designer1.InsertMember(GetType(Model10.CheckBox))
    End Sub
    Private Sub miButtonSelect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonSelect.Click
        Designer1.InsertMember(GetType(Model10.Select))
    End Sub
    Private Sub miButtonEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonEdit.Click
        Designer1.InsertMember(GetType(Model10.Edit))
    End Sub
    Private Sub miButtonUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonUpdate.Click
        Designer1.InsertMember(GetType(Model10.Update))
    End Sub
    Private Sub miButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonCancel.Click
        Designer1.InsertMember(GetType(Model10.Cancel))
    End Sub
    Private Sub miButtonDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonDelete.Click
        Designer1.InsertMember(GetType(Model10.Delete))
    End Sub
    Private Sub miButtonBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonBrowse.Click
        Designer1.InsertMember(GetType(Model10.Browse))
    End Sub
    Private Sub miButtonComputer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonComputer.Click
        Designer1.InsertMember(GetType(Model10.Computer))
    End Sub
    Private Sub miButtonExpand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonExpand.Click
        Designer1.InsertMember(GetType(Model10.Expand))
    End Sub
    Private Sub miButtonNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonNext.Click
        Designer1.InsertMember(GetType(Model10.Next))
    End Sub
    Private Sub miButtonMultiSelect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonMultiSelect.Click
        Designer1.InsertMember(GetType(Model10.MultiSelect))
    End Sub
    Private Sub miButtonDrilldown_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonDrilldown.Click
        Designer1.InsertMember(GetType(Model10.Drilldown))
    End Sub
    Private Sub miButtonLookup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miButtonLookup.Click
        Designer1.InsertMember(GetType(Model10.Lookup))
    End Sub
    Private Sub miInsertSub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertSub.Click
        Designer1.InsertMember(GetType(Model10.Sub))
    End Sub
    Private Sub miInsertChart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miInsertChart.Click
        Designer1.InsertMember(GetType(Model10.Chart))
    End Sub
    Private Sub miMembersAlignToGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miMembersAlignToGrid.Click
        Designer1.AlignToGrid()
    End Sub
    Private Sub miMembersSizeToGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miMembersSizeToGrid.Click
        Designer1.SizeToGrid()
    End Sub
    Private Sub miMembersBringToFront_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miMembersBringToFront.Click
        Designer1.ToFront()
    End Sub
    Private Sub miMembersSendToBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miMembersSendToBack.Click
        Designer1.ToBack()
    End Sub
    Private Sub miMembersChangeTo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miMembersChangeTo.Click
        Changed = True
    End Sub
    Private Sub miLayoutProperties_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miLayoutProperties.Click
        Dim frm As New Avand.FTable(Designer1.Table.Presentation, Designer1.Table)
        frm.ShowDialog(Me)
        If frm.Changed Then
            Designer1.ResetTable()
            Me.Size = Designer1.Table.Size
            Me.Text = GetSystemResource("Layout.Title") & " - " & Designer1.Table.Presentation.Name & "\" & Designer1.Table.Name

            Dim tn As TreeNode
            For Each tn In mForm.TreeView1.Nodes(0).Nodes(1).Nodes
                If tn.Tag Is Designer1.Table Then
                    tn.Text = Designer1.Table.Name
                    Exit For
                End If
            Next : tn = Nothing
        End If
        frm = Nothing
    End Sub
    Private Sub miSectionProperties_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miSectionProperties.Click
        Select Case Designer1.SelectedSection.GetType.ToString
            Case "Model10.Pager"
                Dim frm As New Avand.FPager(Designer1.SelectedSection.GetName, Designer1.Table, CType(Designer1.SelectedSection, Model10.Pager))
                frm.ShowDialog(Me)
                If frm.Changed Then Designer1.ResetSection()
                frm = Nothing
            Case "Model10.Grouper"
                Dim frm As New Avand.FGrouper(Designer1.SelectedSection.GetName, Designer1.Table, CType(Designer1.SelectedSection, Model10.Grouper))
                frm.ShowDialog(Me)
                If frm.Changed Then Designer1.ResetSection()
                frm = Nothing
            Case "Model10.Detail"
                Dim frm As New Avand.FDetail(Designer1.Table, CType(Designer1.SelectedSection, Model10.Detail))
                frm.ShowDialog(Me)
                If frm.Changed Then Designer1.ResetSection()
                frm = Nothing
        End Select
    End Sub
    Private Sub miMembersProperties_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miMembersProperties.Click
        If Designer1.SelectedMember Is Nothing Then
            'MsgBox("There is no current member.")
        Else
            Select Case Designer1.SelectedMember.GetType.ToString
                Case "Model10.Line"
                    Dim frm As New Avand.FLine(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Line))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Frame"
                    Dim frm As New Avand.FFrame(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Frame))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Label"
                    Dim frm As New Avand.FLabel(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Label))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.TextBox"
                    Dim frm As New Avand.FTextBox(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.TextBox))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.PictureBox"
                    Dim frm As New Avand.FPictureBox(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.PictureBox))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.CheckBox"
                    Dim frm As New Avand.FCheckBox(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.CheckBox))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Select", "Model10.Edit", "Model10.Update", "Model10.Cancel", "Model10.Delete"
                    Dim frm As New Avand.FButton(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Button))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Browse"
                    Dim frm As New Avand.FBrowse(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Browse))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Computer"
                    Dim frm As New Avand.FComputer(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Computer))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Expand"
                    Dim frm As New Avand.FExpand(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Expand))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Next"
                    Dim frm As New Avand.FNext(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Next))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.MultiSelect"
                    Dim frm As New Avand.FMultiSelect(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.MultiSelect))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Drilldown"
                    Dim frm As New Avand.FDrilldown(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Drilldown))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Lookup"
                    Dim frm As New Avand.FLookup(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Lookup))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Sub"
                    Dim frm As New Avand.FSub(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Sub))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
                Case "Model10.Chart"
                    Dim frm As New Avand.FChart(Designer1.SelectedSection, CType(Designer1.SelectedMember, Model10.Chart))
                    frm.ShowDialog(Me)
                    If frm.Changed Then Designer1.ResetMembers()
                    frm = Nothing
            End Select
        End If
    End Sub

    Private Sub Toolbar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles Toolbar1.ButtonClick
        Select Case Toolbar1.Buttons.IndexOf(e.Button)
            Case 0 : miFilePrint.PerformClick()
            Case 1 : miFilePrintPreview.PerformClick()
            Case 2 '-
            Case 3 : miFileFormView.PerformClick()
            Case 4 : miFileDatasheetView.PerformClick()
            Case 5 '-
            Case 6 : miEditCut.PerformClick()
            Case 7 : miEditCopy.PerformClick()
            Case 8 : miEditPaste.PerformClick()
            Case 9 '-
            Case 10 : miEditUndo.PerformClick()
            Case 11 : miEditRedo.PerformClick()
            Case 12 '-
            Case 13 : miViewPropertyPage.PerformClick()
        End Select
    End Sub
    Private Sub Toolbar2_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles Toolbar2.ButtonClick
        Select Case Toolbar2.Buttons.IndexOf(e.Button)
            Case 0 'Pointer
                Unpush()
                tbPointer.Pushed = True
                Designer1.Cursor = Cursors.Default
            Case 1 '-
            Case 2 'Line
                Unpush()
                tbLine.Pushed = True
                Designer1.InsertMember(GetType(Model10.Line), "", True)
            Case 3 'Frame
                Unpush()
                tbFrame.Pushed = True
                Designer1.InsertMember(GetType(Model10.Frame), "", True)
            Case 4 'Label
                Unpush()
                tbLabel.Pushed = True
                Designer1.InsertMember(GetType(Model10.Label), "", True)
            Case 5 'TextBox
                Unpush()
                tbTextBox.Pushed = True
                Designer1.InsertMember(GetType(Model10.TextBox), "", True)
            Case 6 'PictureBox
                Unpush()
                tbPictureBox.Pushed = True
                Designer1.InsertMember(GetType(Model10.PictureBox), "", True)
            Case 7 'CheckBox
                Unpush()
                tbCheckBox.Pushed = True
                Designer1.InsertMember(GetType(Model10.CheckBox), "", True)
            Case 8 'Button
            Case 9 '-
            Case 10 'Sub
                Unpush()
                tbSub.Pushed = True
                Designer1.InsertMember(GetType(Model10.Sub), "", True)
            Case 11 'Chart
                Unpush()
                tbChart.Pushed = True
                Designer1.InsertMember(GetType(Model10.Chart), "", True)
        End Select
    End Sub
    Private Sub Toolbar2_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Toolbar2.DoubleClick
        Dim tb As ToolBarButton
        For Each tb In Toolbar2.Buttons
            If tb.Pushed Then
                tb.Pushed = False
                Toolbar2.Buttons(0).Pushed = True
                If Not Designer1.SelectedSection Is Nothing Then
                    Select Case Toolbar2.Buttons.IndexOf(tb)
                        Case 0 'Pointer
                        Case 1 '-
                        Case 2 : Designer1.InsertMember(GetType(Model10.Line))
                        Case 3 : Designer1.InsertMember(GetType(Model10.Frame))
                        Case 4 : Designer1.InsertMember(GetType(Model10.Label))
                        Case 5 : Designer1.InsertMember(GetType(Model10.TextBox))
                        Case 6 : Designer1.InsertMember(GetType(Model10.PictureBox))
                        Case 7 : Designer1.InsertMember(GetType(Model10.CheckBox))
                        Case 8 'Button
                        Case 9 '-
                        Case 10 : Designer1.InsertMember(GetType(Model10.Sub))
                        Case 11 : Designer1.InsertMember(GetType(Model10.Chart))
                    End Select
                End If
                Designer1.Cursor = Cursors.Default
                Exit For
            End If
        Next : tb = Nothing
    End Sub

    Private Sub SetMenu()
        If Designer1.SelectedMembersCount = 0 Then
            miViewBar5.Visible = False
            miMembersAlignToGrid.Visible = False
            miMembersSizeToGrid.Visible = False
            miViewBar6.Visible = False
            miMembersBringToFront.Visible = False
            miMembersSendToBack.Visible = False
            miViewBar7.Visible = False
            miMembersChangeTo.Visible = False
            If Designer1.SelectedSection Is Nothing Then
                miEditBar1.Visible = False
                miEditCut.Visible = False : tbCut.Enabled = False
                miEditCopy.Visible = False : tbCopy.Enabled = False
                miEditPaste.Visible = False : tbPaste.Enabled = False
                '--------------------------------
                miLayoutProperties.Visible = True : miLayoutProperties.Shortcut = Shortcut.F4
                miSectionProperties.Visible = False : miSectionProperties.Shortcut = Shortcut.None
                miMembersProperties.Visible = False : miMembersProperties.Shortcut = Shortcut.None
            Else
                miEditBar1.Visible = True
                miEditCut.Visible = True : tbCut.Enabled = True
                miEditCopy.Visible = False : tbCopy.Enabled = False
                miEditPaste.Visible = True : tbPaste.Enabled = True
                '--------------------------------
                miLayoutProperties.Visible = False : miLayoutProperties.Shortcut = Shortcut.None
                miSectionProperties.Visible = True : miSectionProperties.Shortcut = Shortcut.F4
                miMembersProperties.Visible = False : miMembersProperties.Shortcut = Shortcut.None
            End If
        Else
            miEditBar1.Visible = True
            miEditCut.Visible = True : tbCut.Enabled = True
            miEditCopy.Visible = True : tbCopy.Enabled = True
            miEditPaste.Visible = True : tbPaste.Enabled = True
            '--------------------------------
            miViewBar5.Visible = True
            miMembersAlignToGrid.Visible = True
            miMembersSizeToGrid.Visible = True
            miViewBar6.Visible = True
            miMembersBringToFront.Visible = True
            miMembersSendToBack.Visible = True
            miViewBar7.Visible = True
            miMembersChangeTo.Visible = True
            '--------------------------------
            miLayoutProperties.Visible = False : miLayoutProperties.Shortcut = Shortcut.None
            miSectionProperties.Visible = False : miSectionProperties.Shortcut = Shortcut.None
            miMembersProperties.Visible = True : miMembersProperties.Shortcut = Shortcut.F4
        End If
    End Sub
    Private Sub Unpush()
        tbPointer.Pushed = False
        '-----------------------
        tbLine.Pushed = False
        tbFrame.Pushed = False
        tbLabel.Pushed = False
        tbTextBox.Pushed = False
        tbPictureBox.Pushed = False
        tbCheckBox.Pushed = False
        'Button
        '-----------------------
        tbSub.Pushed = False
        tbChart.Pushed = False
    End Sub

    Public Property Changed() As Boolean
        Get
            Return mChanged
        End Get
        Set(ByVal Value As Boolean)
            mChanged = Value

            mForm.Changed = Value
            If Panel2.Visible Then SetProperties()
        End Set
    End Property
    Public Property Connections() As Model10.ConnectionCollection
        Get
            Return mConnections
        End Get
        Set(ByVal Value As Model10.ConnectionCollection)
            mConnections = Value
        End Set
    End Property
    Public Property Form() As Avand.Presentation
        Get
            Return mForm
        End Get
        Set(ByVal Value As Avand.Presentation)
            mForm = Value
        End Set
    End Property
    Public Property OleDbConnection() As OleDb.OleDbConnection
        Get
            Return mOleDbConnection
        End Get
        Set(ByVal Value As OleDb.OleDbConnection)
            mOleDbConnection = Value
        End Set
    End Property

    Public Sub Fill()
        Me.Text = GetSystemResource("Layout.Title") & " - " & Designer1.Table.Presentation.Name & "\" & Designer1.Table.Name
        Select Case mForm.EditMode
            Case [Global].EditMode.File
            Case [Global].EditMode.Node
        End Select
        Designer1.User = mForm.User
        Designer1.Fill()
        SetMenu()
        mChanged = False

        miLayoutRuler.Checked = Designer1.Table.DisplayRulers
        miLayoutGrid.Checked = Designer1.Table.DisplayGrid
        miLayoutSnapToGrid.Checked = Designer1.Table.SnapToGrid
        miLayoutLockControls.Checked = Designer1.Table.Locked
        miLayoutPrintableView.Checked = Designer1.Table.DesignerMode = Model10.DesignerMode.PrintableView
        miLayoutFormView.Checked = Designer1.Table.DesignerMode = Model10.DesignerMode.FormView

        miLayoutPageHeader.Checked = Not Designer1.Table.PageHeader Is Nothing
        miLayoutGroupHeader.Checked = Not Designer1.Table.GroupHeader Is Nothing
        miLayoutDetail.Checked = Not Designer1.Table.Detail Is Nothing
        miLayoutGroupFooter.Checked = Not Designer1.Table.GroupFooter Is Nothing
        miLayoutPageFooter.Checked = Not Designer1.Table.PageFooter Is Nothing

        'miMembersBringToFront.Enabled = Not Designer1.SelectedSection.Members(Designer1.SelectedSection.Members.Count - 1) Is Designer1.SelectedMember
        'miMembersSendToBack.Enabled = Not Designer1.SelectedSection.Members(0) Is Designer1.SelectedMember
    End Sub
    Public Sub New(ByVal form As Avand.Presentation, ByVal table As Model10.Table, ByVal oleDbConnection As OleDb.OleDbConnection, ByVal connections As Model10.ConnectionCollection)
        MyBase.New()
        InitializeComponent()
        PageSetupDialog1.PageSettings = New Printing.PageSettings
        PageSetupDialog1.PrinterSettings = New Printing.PrinterSettings

        'Me.MdiParent = fMain
        'Me.Size = table.Size
        form.Layouts.Add(Me)
        mConnections = connections
        mForm = form
        Designer1.Table = table
        mOleDbConnection = oleDbConnection
        Fill()
    End Sub
    Public Sub SetProperties()
        If Designer1.SelectedMembersCount = 0 Then
            If Designer1.SelectedSection Is Nothing Then
                PropertyGrid1.SelectedObject = Designer1.Table
                Title1.Text = "Table Properties"
            Else
                PropertyGrid1.SelectedObject = Designer1.SelectedSection
                Title1.Text = Designer1.SelectedSection.GetName & " Properties"
            End If
        Else
            PropertyGrid1.SelectedObjects = Designer1.GetMembers
            If Designer1.SelectedMembersCount = 1 Then
                Title1.Text = TypeName(PropertyGrid1.SelectedObjects(0)) & " Properties"
            Else
                Title1.Text = "Members Properties"
            End If
        End If
    End Sub
End Class

'Private Sub ContextMenu_Popup(ByVal sender As System.Object, ByVal e As System.EventArgs)
'    Dim i As Integer
'    For i = ContextMenu3.MenuItems.Count - 1 To 1 - CInt(Designer1.Table.DataTable.Columns.Count > 0) Step -1
'        ContextMenu3.MenuItems.RemoveAt(i)
'    Next

'    If Designer1.Table.DataTable.Columns.Count > 0 And ContextMenu3.MenuItems.Count = 1 Then
'        ContextMenu3.MenuItems.Add("-")
'    End If

'    Dim col As DataColumn
'    For Each col In Designer1.Table.DataTable.Columns
'        ContextMenu3.MenuItems.Add(col.ColumnName, AddressOf TextBox_Click)
'    Next : col = Nothing
'End Sub
'Private Sub TextBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'    Unpush()
'    Designer1.InsertMember(GetType(Model10.TextBox), CType(sender, MenuItem).Text, True)
'End Sub
